﻿<%@ Page Title="Teacher's Log Entries" Language="C#" MasterPageFile="~/masterpage.master" AutoEventWireup="true" CodeFile="LogEntries.aspx.cs" Inherits="LogEntries" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
	<table width="90%">
<tr align=left style="font-family: Arial, Helvetica, sans-serif;font-style: normal;font-size:12px;">
<td>Sections:&nbsp;<asp:DropDownList ID="ddlSections" runat="server" 
		AutoPostBack="True" DataTextField="SECTION_TITLE" DataValueField="SECTION_ID" 
		onselectedindexchanged="ddlSections_SelectedIndexChanged">
	</asp:DropDownList>
	&nbsp;
Students:&nbsp;<asp:DropDownList ID="ddlStudents" runat="server" 
		DataTextField="LASTFIRST" DataValueField="STUDENT_ID" AutoPostBack="True" 
		onselectedindexchanged="ddlStudents_SelectedIndexChanged">
	</asp:DropDownList>
&nbsp;
Type:&nbsp;<asp:DropDownList ID="ddlTypes" runat="server" 
		DataTextField="DESCRIPTION" DataValueField="LOG_TYPE_ID">
	</asp:DropDownList>
&nbsp;
	<asp:ImageButton ID="bGo"  runat="server" ImageUrl="images/go_button.png" Text="Go" onclick="bGo_Click" />
	</td><td>
	<asp:ImageButton ID="bAdd" runat="server" Text="Add" ToolTip="Add New"
		onclick="bAdd_Click" ImageUrl="images/icons/add_new_icon.png"/>
		
		<asp:ImageButton ImageUrl="Images/excel_icon2.png" ID="ImageButton1" 
			runat="server" ToolTip="Export To Excel" onclick="lbExport_Click" Visible="False" ></asp:ImageButton>

</td>
</tr>
</table>
<div id="divcontainer" style="HEIGHT:300px; WIDTH:90%; OVERFLOW:auto">
<asp:GridView ID="gvLogEntries" runat="server" AutoGenerateColumns="False" 
		onrowcancelingedit="gvLogEntries_RowCancelingEdit" 
		onrowdatabound="gvLogEntries_RowDataBound" 
	onrowupdating="gvLogEntries_RowUpdating"  CssClass ="stats" Width="100%" 
		onrowediting="gvLogEntries_RowEditing" onrowupdated="gvLogEntries_RowUpdated" 
		AllowSorting="True" onsorting="gvLogEntries_Sorting" DataKeyNames="LOG_ID">
	<RowStyle BackColor="White" />
	<Columns>
		<asp:BoundField DataField="LOG_DATE" HeaderText="Date" ReadOnly="True" 
			SortExpression="LOG_DATE" DataFormatString="{0:d}" >
		<ItemStyle HorizontalAlign="Left" Width="100px" VerticalAlign="Top" />
		</asp:BoundField>
		<asp:BoundField DataField="TEACHER_NAME" HeaderText="Teacher" ReadOnly="True" 
			SortExpression="TEACHER_NAME" >
		<ItemStyle HorizontalAlign="Left" Width="150px" VerticalAlign="Top" />
		</asp:BoundField>
		<asp:TemplateField HeaderText="Type" SortExpression="LOG_TYPE" >
			<EditItemTemplate>
				<asp:DropDownList ID="ddList" DataTextField="DESCRIPTION" DataValueField="LOG_TYPE_ID"  runat="server">
				</asp:DropDownList>
			</EditItemTemplate>
			<ItemTemplate>
				<asp:Label ID="Label1" runat="server" Text='<%# Bind("LOG_TYPE") %>'></asp:Label>
			</ItemTemplate>
			<ItemStyle HorizontalAlign="Center" Width="100px" VerticalAlign="Top" />
		</asp:TemplateField>
		<asp:TemplateField HeaderText="Note" SortExpression="ENTRY">
			<EditItemTemplate>
				<asp:TextBox ID="TextBox2" TextMode=MultiLine Width="100%"  Rows="3" runat="server" Text='<%# Bind("ENTRY") %>'></asp:TextBox>
			</EditItemTemplate>
			<ItemTemplate>
				<asp:Label ID="Label2" runat="server" Text='<%# Bind("ENTRY") %>'></asp:Label>
			</ItemTemplate>
			<ItemStyle VerticalAlign=Top HorizontalAlign=Left />
		</asp:TemplateField>
		<asp:CommandField ButtonType="Image" InsertVisible="False" 
			ShowEditButton="True" EditText="Edit" EditImageUrl="~/Images/icons/edit.png" CancelImageUrl="~/Images/icons/cancel_icon.png" UpdateImageUrl="~/Images/icons/save_icon.png" >
		<ItemStyle Width="50px" />
		</asp:CommandField>
	</Columns>
	<FooterStyle BackColor="#CCCCCC" />
	<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
	<EmptyDataTemplate>
		No Records
	</EmptyDataTemplate>
	<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<HeaderStyle CssClass="hed" />
	</asp:GridView>
	</div>
</asp:Content>

